package me.itsoo.elasticbatis.session;

import me.itsoo.elasticbatis.builder.xml.XMLConfigBuilder;

import java.io.Reader;

/**
 * SqlSessionFactoryBuilder
 *
 * @author zhangxy4
 * @version 0.0.1
 * @since 2025/4/4
 */
public class SqlSessionFactoryBuilder {

    public SqlSessionFactory build(Reader reader) {
        XMLConfigBuilder xmlConfigBuilder = new XMLConfigBuilder(reader);
        return this.build(xmlConfigBuilder.parse());
    }

    public SqlSessionFactory build(Configuration config) {
        return new SqlSessionFactory(config);
    }
}
